﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class DanhMucConBUS
    {
        public static List<DanhMucConDTO> layDSDanhMucCon(int maDanhMucChinh)
        {
            return DanhMucConDAO.layDSDanhMucCon(maDanhMucChinh);
        }

        public static List<DanhMucConDTO> getAll()
        {
            return DanhMucConDAO.getAll();
        }

        public static DanhMucConDTO getAlongCode(int maDanhMucCon)
        {
            return DanhMucConDAO.getAlongCode(maDanhMucCon);
        }

        public static void Insert(DanhMucConDTO _insert)
        {
            DanhMucConDAO.Insert(_insert);
        }

        public static void Delete(int maDanhMucCon)
        {
            DanhMucConDAO.Delete(maDanhMucCon);
        }

        public static void Update(DanhMucConDTO dto)
        {
            DanhMucConDAO.Update(dto);
        }

        public static int getMa(string tenDanhMuc)
        {
            return DanhMucConDAO.getMa(tenDanhMuc);
        }

        public static string getTenDanhMuc(int maDanhMuc)
        {
            return DanhMucConDAO.getTenDanhMuc(maDanhMuc);
        }

        public static int getMaDanhMucChinh(int maDanhMucCon)
        {
            return DanhMucConDAO.getMaDanhMucChinh(maDanhMucCon);
        }
    }
}
